const { exec } = require('child_process')

function run_shell(cmd) {
    exec(cmd, (error, stdout, stderr) => {
        if (error) {
            console.log(`执行出现了错误：${error}`)
            return
        }
        // console.log(stdout)
        // console.log(typeof(stdout))
        return stdout
    })
}

async function run_test() {
    let val = await run_shell('pwd')
    return val 
}

// console.log(run_shell('pwd'))
console.log(run_test())